﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

using ChatForum.DataContract;

namespace ChatForum.SOAP.ServiceContract
{
    [ServiceContract]
	public interface IForumService
    {
        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
		IEnumerable<CategoryDTO> GetAllCategory();

        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
        CategoryDTO GetCategoryById(Guid catId);

        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
		void CreateCategory(CategoryDTO category);

		[OperationContract]
		[FaultContract(typeof(ChatForumFault))]
		void ModifyCategory(CategoryDTO category);

        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
        void CreatePost(PostDTO post);

        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
        PostDTO GetPostById(Guid postId);

        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
        IEnumerable<PostDTO> GetPostbyCategory(Guid categoryId, bool includeChildren);

        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
        IEnumerable<PostDTO> GetPostbyCreator(string userId, bool includeChildren);

        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
		IEnumerable<PostDTO> GetPostbyParentPost(Guid parentPostid, bool includeChildren);

		[OperationContract]
		[FaultContract(typeof(ChatForumFault))]
		IEnumerable<PostDTO> GetThread(Guid PostId);
    }
}
